import { PixelRatio,Dimensions,StatusBar } from 'react-native';
const sh = Dimensions.get('window').height;
const sw = Dimensions.get('window').width;
const statusBarHeight = StatusBar.currentHeight ?? 0;

function dp(want_px: number) {
    let fontscale = PixelRatio.getFontScale();
    let out = (1.0 / fontscale) * want_px;
    return out;
}

/**
 *  常用数值
 */
export const border1 = 1;
export const border_1 = dp(1);
export const x34 = dp(34);


/**
 *  视频组件
 */
export const VideoBorderRadius:number = 9;

/**
 *  底部导航栏
 */
export const BottomTab_borderTop:number = border_1;
export const BottomTab_tabIconSize:number = dp(28);
export const BottomTab_tabHeight:number = 56;
export const BottomTab_paddingTop:number = 2;
export const BottomTab_svgScale:number = 0.028;


/**
 *  视频刷右侧边栏
 */
export const VideoSideBar_HeaderSize:number = 64;
export const VideoSideBar_HeaderRadius:number = VideoSideBar_HeaderSize/2;
export const VideoSideBar_right:number = 8;
export const VideoSideBar_top:number = sh * 0.4;
export const VideoSideBar_HeaderBorderWidth:number = 2;
export const VideoSideBar_FollowIconSize:number = 25;
export const VideoSideBar_FollowIconTop:number = -12;

/**
 *  视频刷底部标题区
 */
export const VideoBottomBar_Width:number = sw - VideoSideBar_HeaderSize - VideoSideBar_right - 20;
export const VideoBottomBar_left: number = 12;
export const VideoBottomBar_bottom: number = sh * 0.01;
export const VideoBottomBar_nameBottom: number = 10;
export const VideoBottomBar_titleBottom: number = 5;

// 安全视图高度
export const safeHeight = sh - BottomTab_tabHeight - statusBarHeight;